module ApplicationHelper
  def full_title(title)
    baseTitle ="高清音乐"
    return baseTitle if (title.blank?)
    return "#{baseTitle}|#{title}"
  end

  def htmlLink_for_del(delUrl,titleText="删除")
    link_to image_tag("delete.jpeg",class:"delete_icon"), delUrl, remote: true, method: :delete,title: titleText
  end

  #根据bool值返回对应的中文字词
  def translate_boolean(prop=true,chineseWord=["是","不是"])
    #prop= true 返回数组第一个元素， false返回数组最后一个元素
    return (prop ? chineseWord[0] : chineseWord[-1])
  end
end
